package gmusic.bo;

import java.sql.ResultSet;
import java.sql.SQLException;
import java.util.ArrayList;
import java.util.List;

public class ArtistBean {

	protected int id;

	protected long maid;

	protected String nom;

	protected int paysId = -1;

	protected String commentaire = null;

	protected List<ReleaseBean> releases = new ArrayList<ReleaseBean>();

	protected String URLLogo = null;

	public ArtistBean() {
	}

	public ArtistBean(ResultSet rs) throws SQLException {
		setId(rs.getInt("gr_id"));
		setMaid(rs.getLong("maid"));
		setNom(rs.getString("gr_nom"));
		setPaysId(rs.getInt("gr_pa_id"));
		setCommentaire(rs.getString("gr_commentaire"));
	}

	public int getId() {
		return id;
	}

	public void setId(int i) {
		id = i;
	}

	public int getGmid() {
		return id;
	}

	public void setGmid(int i) {
		id = i;
	}

	public String getNom() {
		return nom;
	}

	public void setNom(String n) {
		nom = n;
	}

	public int getPaysId() {
		return paysId;
	}

	public void setPaysId(int p) {
		paysId = p;
	}

	/** @deprecated */
	public void setIdPays(int p) {
		paysId = p;
	}

	public String getCommentaire() {
		return commentaire;
	}

	public void setCommentaire(String c) {
		commentaire = c;
	}

	public List<ReleaseBean> getReleases() {
		return releases;
	}

	public void setReleases(List<ReleaseBean> albums) {
		this.releases = albums;
	}

	public void addRelease(ReleaseBean r) {
		releases.add(r);
	}

	public long getMaid() {
		return maid;
	}

	public void setMaid(long maid) {
		this.maid = maid;
	}

	public String toString() {
		return "[GMID " + id + "] " + nom;
	}

	public String getURLLogo() {
		return URLLogo;
	}

	public void setURLLogo(String logo) {
		URLLogo = logo;
	}
}
